/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pclong.config.entity;

import com.pclong.sql.PropertiesHelper;
import java.util.ArrayList;
import java.util.List;
import org.simpleframework.xml.Default;

/**
 *
 * @author long@7road.com       
 */
@Default
public class TankAgentConfigEntity {
    
    private static TankAgentConfigEntity instance;

    /**
     * Get the value of instance
     *
     * @return the value of instance
     */
    public static TankAgentConfigEntity getInstance() {
        if(instance==null){
        instance=new TankAgentConfigEntity();
        }       
        return instance;
    }
  
    private String filePath;

    /**
     * Get the value of filePath
     *
     * @return the value of filePath
     */
    public String getFilePath() {
      filePath=  PropertiesHelper.getProperty("datasource.properties", "filepath").toLowerCase();
        return filePath;
    }

    /**
     * Set the value of filePath
     *
     * @param filePath new value of filePath
     */
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public ServerConfigEntity server;
        ///  Gets or sets the theme name.
       
        public String Theme ;


        
        ///  Gets or sets a boolean value to enable or disable server selection.
       
        public boolean  HomeEnabled ;

        
        ///  Gets or sets a boolean value to enable or disable login.
       
        public boolean LoginEnabled ;

        
        ///  Gets or sets a boolean value to enable or disable payment.
       
        public boolean PayEnabled ;

        
        ///  Gets or sets a boolean value to enable or disable pay request.
       
        public boolean PayRequestEnabled ;

        
        ///  Gets or sets a boolean value to enable or disable mix server.
       
        public boolean MixServerEnabled ;

        
        ///  Gets or sets a boolean value to enable or disable sns transfer.
       
        public boolean SnsTransferEnabled ;

        
        ///  Gets or sets the top links.
       
        public TopLinksConfigEntity TopLinks ;

        
        ///  Gets or sets the game zones.
       
        public List<ServerConfigEntity> Servers ;

        
        ///  Gets or sets the mix servers.
       
        public List<MixServerConfigEntity> MixServers ;

        
        ///  Gets or sets the bulletins.
       
        public List<BulletinConfigEntity> Bulletins ;

        
        ///  Gets or sets the users.
       
        public List<UserConfigEntity> Users ;

        
        /// Gets or sets the users.
       
        //public SiteConfigEntity Site ;

        public TankAgentConfigEntity()
        {
            Theme = "Default";

            HomeEnabled = true;
            LoginEnabled = true;
            PayEnabled = true;
            PayRequestEnabled = true;
            MixServerEnabled = true;
            SnsTransferEnabled = true;

            TopLinks = new TopLinksConfigEntity();

            Servers = new ArrayList<ServerConfigEntity>();

            MixServers = new ArrayList<MixServerConfigEntity>();

            Bulletins = new ArrayList<BulletinConfigEntity>();

            Users = new ArrayList<UserConfigEntity>();

            //Site = new SiteConfigEntity();
            //test server config
            server=new ServerConfigEntity();
        }
    
}
